package com.ks.core.framework.cpsupload.demos.pay1;

import com.ks.core.framework.cpsupload.demos.pay.PaymentChannel;
import com.ks.core.framework.cpsupload.demos.pay.PaymentOperation;

// 支付请求参数基类
public abstract class BasePayParams extends BasePaymentParams implements PayParams {
    protected Double amount;
    protected String currency;
    protected String outTradeNo;
    
    public BasePayParams(PaymentChannel channel) {
        super(channel, PaymentOperation.PAY);
    }

    // 公共支付校验
    @Override
    public void validate() {
        if (amount == null || amount <= 0) {
            throw new IllegalArgumentException("支付金额无效");
        }
        if (outTradeNo == null || outTradeNo.isEmpty()) {
            throw new IllegalArgumentException("商户订单号必填");
        }
    }
    
    // Getter/Setter
}